package com.ruoyi.ems.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 退款单对象 ems_refund_order
 * 
 * @author sh
 * @date 2023-12-11
 */
@Data
public class RefundOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 退款单号 */
    @Excel(name = "退款单号")
    private String refundNo;

    /** 订单编号 */
    @Excel(name = "订单编号")
    private String tradeNo;

    /** 退款金额 */
    @Excel(name = "退款金额")
    private Integer refundAmount;

    /** 支付金额 */
    @Excel(name = "支付金额")
    private Integer total;

    /** 退款单创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "退款单创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date creationTime;

    /** 退款单状态
PENDING =待处理  PROCESSING =退款中  CLOSED = 退款关闭  SUCCESS =已处理  ABNORMAL = 退款异常  */
    @Excel(name = "退款单状态 PENDING =待处理  PROCESSING =退款中  CLOSED = 退款关闭  SUCCESS =已处理  ABNORMAL = 退款异常 ")
    private String status;

    /** 微信退款单号 */
    private String wxRefundNo;

    /** 乐观锁 */
    private Long version;

    /** 修改时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date changeTime;

    /** 退款最大重试次数 */
    @Excel(name = "退款最大重试次数")
    private Long maxFrequency;

    /** 退款成功时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "退款成功时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date successTime;

    /** 卡劵：coupons  饮品：goods */
    @Excel(name = "卡劵：coupons  饮品：goods")
    private String type;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setRefundNo(String refundNo) 
    {
        this.refundNo = refundNo;
    }

    public String getRefundNo() 
    {
        return refundNo;
    }
    public void setTradeNo(String tradeNo) 
    {
        this.tradeNo = tradeNo;
    }

    public String getTradeNo() 
    {
        return tradeNo;
    }


    public Date getCreationTime() 
    {
        return creationTime;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setWxRefundNo(String wxRefundNo) 
    {
        this.wxRefundNo = wxRefundNo;
    }

    public String getWxRefundNo() 
    {
        return wxRefundNo;
    }
    public void setVersion(Long version) 
    {
        this.version = version;
    }

    public Long getVersion() 
    {
        return version;
    }
    public void setChangeTime(Date changeTime) 
    {
        this.changeTime = changeTime;
    }

    public Date getChangeTime() 
    {
        return changeTime;
    }
    public void setMaxFrequency(Long maxFrequency) 
    {
        this.maxFrequency = maxFrequency;
    }

    public Long getMaxFrequency() 
    {
        return maxFrequency;
    }
    public void setSuccessTime(Date successTime) 
    {
        this.successTime = successTime;
    }

    public Date getSuccessTime() 
    {
        return successTime;
    }
    public void setType(String type) 
    {
        this.type = type;
    }

    public String getType() 
    {
        return type;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("refundNo", getRefundNo())
            .append("tradeNo", getTradeNo())
            .append("refundAmount", getRefundAmount())
            .append("total", getTotal())
            .append("creationTime", getCreationTime())
            .append("status", getStatus())
            .append("wxRefundNo", getWxRefundNo())
            .append("version", getVersion())
            .append("changeTime", getChangeTime())
            .append("maxFrequency", getMaxFrequency())
            .append("successTime", getSuccessTime())
            .append("type", getType())
            .toString();
    }
}
